﻿using System;
using System.Collections.Generic;
using System.Linq.Expressions;
using System.Threading.Tasks;
using Jinjia.Approve.Entity;
using Jinjia.Approve.Entity.Entity.JJFlow;
using Jinjia.Approve.Model.VM.Org;

namespace Jinjia.Approve.IRepository
{
    public interface IErpaUserRepository
    {
        Task<erpa_user_tbl> GetById(int id);

        /// <summary>
        /// 条件获取列表
        /// </summary>
        /// <param name="expression"></param>
        /// <returns></returns>
        Task<List<erpa_user_tbl>> GetListAsync(Expression<Func<erpa_user_tbl, bool>> expression);

        Task<List<erpa_user_tbl>> GetUsersByDingTalkUserIds(List<string> userIds);

        /// <summary>
        /// 获取用户上级部门
        /// </summary>
        /// <param name="userId">用户id</param>
        /// <param name="departmentId">部门id</param>
        /// <returns></returns>
        UserParentOrg GetUserParentOrg(int userId = 0, string departmentId = "0");
    }
}